package com.demo.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.demo.entity.Medicine;
import com.demo.entity.Vo.MedicineVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 预防药物表 Mapper 接口
 * @author ZM
 * @since 2020-11-20
 */
public interface MedicineMapper extends BaseMapper<Medicine> {

    /**
     * 预防药物表列表
     * @param pageNumber      页码
     * @param pageSize        每页条数
     * @param medicineId      预防药物ID
     * @param medicineName    药物名称
     * @return
     */
    List<Medicine> medicineList(Integer pageNumber,Integer pageSize,Integer medicineId,String medicineName);

    Integer getCountMedicine(Integer paramInteger, String paramString);

    /**
     * 查询未被删除的药
     * @param medicineId
     * @return
     */
    Medicine queryByIdInEffective(Integer medicineId);

    @Select("select * from pd_medicine where deleted_time is null")
    List<Medicine> queryListInEffective();

}
